home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Graphics / QuickDraw GX / GX->PostScript Sample / GXToPostScript / I⁄O Utilities / IOUtilities.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.2 KB  |  49 lines  |  [TEXT/CWIE]

  1. /*
  2.      File:        IOUtilities.h
  3.  
  4.      Contains:    QuickDraw GX to PostScript conversion code.
  5.                      useful utility functions for convertiong GX->Postscript
  6.  
  7.      Version:    Technology:    Quickdraw GX 1.1.x
  8.       
  9.      Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  10. */
  11.  
  12. #ifndef __IOUTILITIES__
  13. #define __IOUTILITIES__
  14.  
  15. #include "MacMemory.h"
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21.  
  22. // Some useful macros.
  23. #define BITSET(bitArray, bitIndex) *((char*)bitArray + (bitIndex >> 3)) |= (0x80 >> (bitIndex & 0x7) )  
  24. #define BITCLR(bitArray, bitIndex) *((char*)bitArray + (bitIndex >> 3)) &= ~(0x80 >> (bitIndex & 0x7) )  
  25. #define BITTST(bitArray, bitIndex) (*((char*)bitArray + (bitIndex >> 3)) & (0x80 >> (bitIndex & 0x7) )) 
  26.  
  27. // Like blockmove but converts to hex.
  28. void HexBlockMove(unsigned char *srcStr, unsigned char *dstPtr, unsigned long num);
  29.  
  30. // NewHandle returns an error.
  31. OSErr    PrNewHandle(Handle *h, long size);
  32. OSErr    PrNewHandleClear(Handle *h, long size);
  33. OSErr    PrSetHandleSize(Handle h, long newSize);
  34. OSErr    PrNewPtr(Ptr *p, long size);
  35.  
  36. // GetResource, returns an error.
  37. OSErr    FetchResource(OSType    resType, short ID, Handle *h);
  38.  
  39. // For fonts
  40. #include <GXFonts.h>
  41. long MakeMac8BitEncoding(gxFont theFont, unsigned short encoding[]);
  42.  
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46.  
  47.  
  48. #endif
  49.